-
Notifications
You must be signed in to change notification settings - Fork 2
feat: use the deployment's hostname suffix in the UI #133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
headers: useLiteralHeaders ? literalHeaders.map { $0.toSDKHeader() } : [] | ||
) | ||
Task { | ||
await handleTokenExpiry() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
drive-by fix: we need to check for token expiry on app launch. We were previously only checking when the menu bar window was opened, and Connect was disabled. We need to account for when Connect is configured to start when the app is launched.
// If fetching the config fails, there's likely a bigger issue. | ||
// We'll show an error in the UI if they try and do something | ||
logger.error("failed to refresh deployment config: \(error)") | ||
return |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we wanted to show that something went wrong to the user here, the UX would be awkward. I don't think we should create an alert or anything, and I don't think we should reuse the Connect failure error box.
I'm not sure how the user would get into a state where everything else was functional, except the deployment config couldn't be fetched, so I'm happy with this.
Closes #93.
The only time the hostname suffix is used by the desktop app is when an offline workspace needs to be shown in the list, where we naively append
.coder
. This PR sets this appended value to whatever--workspace-hostname-suffix
is configured to deployment-side.We read the config value from the deployment when: